package com.jiuyin.dianjing.ui.activity.team;

import com.jiuyin.dianjing.R;
import com.jiuyin.dianjing.ui.activity.base.BaseActivity;
import com.jiuyin.dianjing.ui.fragment.match.FragmentMatchApplyList;
import com.jiuyin.dianjing.ui.fragment.team.TeamApplyListFragment;

import static com.jiuyin.dianjing.api.constant.ApiConstant.KEY_APPLY_LIST;
import static com.jiuyin.dianjing.api.constant.ApiConstant.KEY_COMPETITIONID;

/**
 * 赛事申请批准界面
 */
public class TeamApplyListActivity extends BaseActivity {

    public String teamId;
    public String competitionId;
    public String applyId;

    @Override
    protected int setLayoutId() {
        return R.layout.activity_team_apply_list;
    }

    @Override
    protected void initData() {
        applyId = getIntent().getStringExtra(KEY_APPLY_LIST);
        if (applyId.equals("0")){
            setTitle("赛事申请列表");
            competitionId = getIntent().getStringExtra(KEY_COMPETITIONID);
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.layout_fragment_apply_list,   FragmentMatchApplyList.newInstance(competitionId))
                    .commit();
        }else {
            setTitle("申请列表");
            teamId = getIntent().getStringExtra("teamId");
            getSupportFragmentManager().beginTransaction()
                    .replace(R.id.layout_fragment_apply_list, TeamApplyListFragment.newInstance(teamId))
                    .commit();
        }
    }

    @Override
    protected void initView() {

    }
}
